﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace WebApp.Controls
{
    public partial class PriceSelect : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //DataSet ds = new DataSet();
            //List<ThePrice> listPrice = new List<ThePrice>();
            //ThePrice price = new ThePrice();
            //price.ID = 1;
            //price.Names = "10元以下";
            //listPrice.Add(price);
            rptPriceSelect.DataSource = GenerateTab();
            rptPriceSelect.DataBind();
        }

        public DataTable GenerateTab()
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ID", typeof(System.Int32));
            dt.Columns.Add("Names", typeof(System.String));
           
            DataRow dr = dt.NewRow();
            dr[0] = 001;
            dr[1] = "10元以下";
            dt.Rows.Add(dr);

            DataRow dr2 = dt.NewRow();
            dr2[0] = 001;
            dr2[1] = "10元-20元";
            dt.Rows.Add(dr2);

            DataRow dr3 = dt.NewRow();
            dr3[0] = 001;
            dr3[1] = "20元-50元";
            dt.Rows.Add(dr3);

            DataRow dr4 = dt.NewRow();
            dr4[0] = 001;
            dr4[1] = "50元-100元";
            dt.Rows.Add(dr4);

            DataRow dr5 = dt.NewRow();
            dr5[0] = 001;
            dr5[1] = "100元-200元";
            dt.Rows.Add(dr5);

            DataRow dr6 = dt.NewRow();
            dr6[0] = 001;
            dr6[1] = "200元-300元";
            dt.Rows.Add(dr6);

            return dt;
        }
        

    }//end class
   
}